import request from '@/utils/request.js'

const prev = '/asset/inventory/';

export default {
  // 查询列表
  list: function(query, pageReq, detailId) {
    return request({
      url: `${prev}detail/list/${detailId}`,
      method: 'post',
      data: query,
      params: pageReq
    })
  },
  autoInventory: function(rfidList) {
    return request({
      url: `${prev}/autoInventory`,
      method: 'put',
      data: rfidList
    })
  },
  getTipContent: function(detailId) {
    return request({
      url: `${prev}getTipContent/${detailId}`
    })
  },
  // 保存并提交申请
  sub: function(id) {
    return request({
      url: `${prev}sub/${id}`,
      method: 'post'
    })
  },

  del: function (id) {
    return request({
      url: '/asset/inApply/'+id,
      method: 'delete'
    })
  },
  finish: function(id) {
    return request({
      url: `${prev}finishRelItem/${id}`,
      method: 'put'
    })
  }
}

